package com.cn.xiaonuo.slbfinances.shopassets.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cn.xiaonuo.slbfinances.shopassets.entity.SlMerchantAssets;
import com.cn.xiaonuo.slbfinances.shopassets.param.PageMerchantAssetsParam;
import com.cn.xiaonuo.slbfinances.shopassets.rsp.PageMerchantAssetsRsp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface SlMerchantAssetsMapper extends BaseMapper<SlMerchantAssets> {
    /**
     * 昨日记录
     * @param shopId
     * @param createTime
     * @return
     */
    SlMerchantAssets yesterday(@Param("shopId") Integer shopId, @Param("createTime") String createTime, @Param("type")Integer type);

    /**
     * 查询商家数量
     * @param param
     * @return
     */
    PageMerchantAssetsRsp selectshxopCount(PageMerchantAssetsParam param);

    /**
     * 金额合计
     * @param param
     * @return
     */
    PageMerchantAssetsRsp sumAmount(PageMerchantAssetsParam param);

    List<SlMerchantAssets> merchantAssetsExcel(PageMerchantAssetsParam param);

    Map<String, Object> sumTotalAmount(PageMerchantAssetsParam param);

    Map<String, Object> sumUnsettled(PageMerchantAssetsParam param);
}
